/**
 * Define all resources path
 */

var soundPath = "/daifugo/assets/sounds/";
var imagePath = "/daifugo/assets/images/";

var g_imageRes = {
    top_backgrond: "top_background.png",
    s_bg: "bg.png",
    s_bg_lady: "bg_lady.png",
    s_btn_card: "btn_card.png",
    s_btn_pass: "btn_pass.png",
    s_player_npc: "player_npc.png",
    s_player_user: "player_user.png",
    s_card: "card.png",
    p_number: "bitmapFontTest.fnt",
    s_number: "bitmapFontTest.png",
    p_CardGame: "ImageNormal.plist",
    s_CardGame: "ImageNormal.png",
    s_ovalcheck: "OvalCheck.png",
    s_overlayer: "overlayer.png",
    s_layer: 'layer.png',
    s_top: 'top.jpg',
    s_top_btn_play: 'top_btn_play.png',
    image_passed: "img_passed.png",
    image_passed_CPU: "img_passedCPU.png",
    image_8flush: "8Flush.png",
    your_rank_1: "play_daifugo.png",
    your_rank_2: "play_fugo.png",
    your_rank_3: "play_himmin.png",
    your_rank_4: "play_daihimmin.png",
    your_turn: "play_yourturn.png",
    player_lock_hand: "lockinghand_on.png",
    player_revolution: "revolution_on.png",
    lock_hand_on: "play_lockinghand_on.png",
    lock_hand_off: "play_lockinghand_off.png",
    revolution_on: "play_revolution_on.png",
    revolution_off: "play_revolution_off.png",
    btn_quit: "play_quit.png",
    btn_ok: "btn_ok.png",
    info: "info.png",
    titlesetting: "setting.png",
    back: "back.png",
    rank_1: "rank1.png",
    rank_2: "rank2.png",
    rank_3: "rank3.png",
    rank_4: "rank4.png"
};

var g_sounds = [{id: "card", src: "card.mp3"},
    {id: "8_flush", src: "8_flush.mp3"}, {id: "daifugo", src: "daifugo.mp3"}, {
        id: "fugo",
        src: "fugo.mp3"
    }, {id: "hinmin", src: "hinmin.mp3"}, {
        id: "daihinmin", src: "daihinmin.mp3"
    }, {id: "deal_card", src: "deal_card.mp3"}, {id: "got_turn", src: "got_turn.mp3"}, {
        id: "player_turn",
        src: "player_turn.mp3"
    }, {id: "revolution", src: "revolution.mp3"},
    {id: "locking_hand_cpu", src: "locking_hand_cpu.mp3"}, {id: "locking_hand_player", src: "locking_hand_player.mp3"},
    {id: "tap", src: "tap.mp3"},{id:'cardshuffle',src:'card-shuffle.mp3'}
];


if (!createjs.Sound.initializeDefaultPlugins()) {
    alert("This browser doesn't support play game sounds");
}
else {
    createjs.Sound.alternateExtensions = ["mp3", "ogg"];
    createjs.Sound.registerManifest(g_sounds, soundPath);
}

var g_fonts = {};
var g_resources = [];
